package com.nifostasky.comic.entitys;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 系统用户信息表
 * </p>
 *
 * @author yuanBo.Wu
 * @since 2021-06-07
 */
@Data
@TableName("sys_user")
@ApiModel(value = "SysUser对象", description = "系统用户信息表")
public class SysUser extends SysBaseEntity implements Serializable {

    @ApiModelProperty(value = "用户名")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "密码")
    @TableField("pass_word")
    private String passWord;

    @ApiModelProperty(value = "密码盐")
    @TableField("salt")
    private String salt;

    @ApiModelProperty(value = "姓名")
    @TableField("nick_name")
    private String nickName;

    @ApiModelProperty(value = "手机号")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "邮箱账号")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "用户类型")
    @TableField("user_type")
    private Integer userType;

    @ApiModelProperty(value = "头像")
    @TableField("avatar")
    private String avatar;

    @ApiModelProperty(value = "主页展示默认源")
    @TableField("spider_id")
    private String spiderId;

    @ApiModelProperty(value = "最后登录时间")
    @TableField("last_login_time")
    private String lastLoginTime;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "状态 0正常 1删除 2禁用")
    @TableField("state")
    private Integer state;

    @ApiModelProperty(value = "本层级管理员: 0否 1是")
    @TableField("admin_flag")
    private Boolean adminFlag;

    @ApiModelProperty(value = "是否超级管理员: 0否 1是")
    @TableField("super_admin")
    private Boolean superAdmin;

    @ApiModelProperty(value = "行政区域code")
    @TableField("org_id")
    private Long orgId;

    @ApiModelProperty(value = "行政区域code")
    @TableField("org_code")
    private String orgCode;

    @ApiModelProperty(value = "单位code")
    @TableField("unit_code")
    private String unitCode;

    @ApiModelProperty(value = "所属单位id")
    @TableField("unit_id")
    private Long unitId;

    @ApiModelProperty(value = "是否组长: 0否(组员) 1是(组长)")
    @TableField("member_flag")
    private Boolean memberFlag;

    @ApiModelProperty(value = "单位列表ID")
    @TableField(exist = false)
    private String[] userOrgs;

    @ApiModelProperty(value = "区域名称")
    @TableField(exist = false)
    private String orgName;

    @ApiModelProperty(value = "单位名称")
    @TableField(exist = false)
    private String unitName;
}
